import request from '@/utils/request'
// --------  卡卷设置 --------

let BASE_ADDRESS = '/market/coupon'

//  分页查询
export const getCouponListApi = (params) => {
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: "get",
        params
    })
}
//  添加
export const getCouponAddApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: "post",
        data
    })
}
// 修改
export const getCouponEditApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: "put",
        data
    })
}

//id查询
export const getCouponGetInfoApi = (params) => {
    return request({
        url: `${BASE_ADDRESS}/getInfo`,
        method: "get",
        params
    })
}


//刪除卡卷
export const getCouponRemoveApi = (data) => {
    return request({
        url: `${BASE_ADDRESS}/remove/${data}`,
        method: "delete",

    })
}